<template>
    <div class="detail">
        <detail-header :detail-data="dt"></detail-header>
        <detail-ticket :tickets="dt.categoryList"></detail-ticket>
    </div>
</template>

<script>
    import DetailHeader from "./components/DetailHeader"
    import DetailTicket from "./components/DetailTicket"
    export default {
        name: "Detail",
        data() {
          return {
            dt: {}
          }
        },
        created() {
            // 获取url参数,并请求数据
            // console.log(this.$route.params)
            this.$axios.get('/mock/detail.json').then((res) => {
                if (res.data.ret) {
                    this.dt = res.data.data
                }
            }).catch((error) => {})
        },
        components: {
            DetailHeader,
            DetailTicket
        }
    }
</script>

<style scoped>

</style>